/*
 * @Author: HeAo
 * @Date: 2021-12-29 11:00:46
 * @LastEditTime: 2021-12-29 16:07:32
 * @LastEditors: HeAo
 * @Description: 
 * @FilePath: \study\day04\vue-project1\src\router\index.js
 * 别乱动！
 */
import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Student from '../views/Student.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/student',
    name: 'Student',
    component: Student
  },
  {
    path: '/about',
    name: 'About',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import('../views/About.vue')
  }
]

const router = new VueRouter({
  routes
})

export default router
